In a heating apparatus, particularly a microwave oven, it is desired to automatically terminate cooking operation when foodstuff has been appropriately cooked. It has been proposed to provide a humidity/gas sensor in the path of air exhausted from the ventilated heating chamber to detect a gaseous substance emitted by foodstuff being cooked as a indication of the condition of the foodstuff. However, difficulty has been encountered to provide an accurate indication of the condition of the heated material.